<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./Fenzhi.js"></script>
  </head>
  <body>
    <!-- 名字的隐藏规则：
    两个字：张三 => 张*
    三个字：董必武 => 董*武
    四个字：诸葛孔明 => 诸葛*明 隐藏第三个字
    四个字以上：爱新觉罗清 => 爱新**清 保留前两个和最后一个字
  -->

    <script>
      // console.log(Boxue.CustomIdNumberFn('411381199205262630'));
      // console.log(Boxue.CustomIdNumberFn('411381199205262630', 2));
      // console.log(Boxue.CustomIdNumberFn('4113811992052626300'));
      // console.log(Boxue.CustomIdNumberFn(411381199205262630111));

      // console.log(
      //   Fenzhi.CustomHideStrGeneral('411381199905262666', 6, 12, '*')
      // );
      // console.log(Fenzhi.CustomHideStrGeneral('18003815888', 3, 10, 'x'));
      // console.log(Fenzhi.CustomHideStrGeneral('2023-03-14', 0, 3, 'x'));
      // console.log(
      //   Fenzhi.CustomHideStrGeneral('411381199905262666', [0, 2, 5, 6], 'x')
      // );
      console.log(Fenzhi.CustomPersonNameFn(''));
      console.log(Fenzhi.CustomPersonNameFn('张'));

      console.log(Fenzhi.CustomPersonNameFn('张三'));
      console.log(Fenzhi.CustomPersonNameFn('张三五'));
      console.log(Fenzhi.CustomPersonNameFn('张三五四'));
      console.log(Fenzhi.CustomPersonNameFn('张三五四', '!'));
      console.log(Fenzhi.CustomPersonNameFn('张三五四五'));
      console.log(Fenzhi.CustomPersonNameFn('张三五四五六'));

      console.log(Fenzhi.CustomHideStrGeneral('abcdefghijklmn', 1, 5, '*'));
      console.log(
        Fenzhi.CustomHideStrGeneral('abcdefghijklmn', [0, 1, 4, 5, 6], '*')
      );
      console.log(
        Fenzhi.CustomHideStrGeneral(
          'abcdefghijklmn',
          [
            [0, 2],
            [4, 6],
          ],
          '*'
        )
      );
    </script>
  </body>
</html>
